<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户中心</title>
    <meta th:replace="website/uc/inc_head.html" />
    <link rel="stylesheet" href="/static/css/uc.css">
</head>
<body class="">
    <div th:replace="website/template/top.html"></div>
    <!--面包-->
    <div class="bread-crumb" style="padding:2.67vmin 2.67vmin;">
        <span th:replace="website/uc/inc_breadcrumb.html"></span>
        <span class="cur">我的信息</span>
    </div>
    <div class="content-page uc-page" id="app">

        <!--内容-->
        <fieldset class="layui-elem-field layui-field-title site-title">
            <legend><a name="grid">我的信息</a></legend>
        </fieldset>
        <div class="layui-form"> <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->
            <div class="layui-form-item">
                <label class="layui-form-label">账号名称：</label>
                <div class="layui-input-block" th:text="${session.webUser?.name}"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">我的身份：</label>
                <div class="layui-input-block" th:text="${session.role?.name?: '无'}"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属店铺：</label>
                <div class="layui-input-block" th:text="${shop?.name?: '未归属'}"></div>
            </div>
        </div>
        <!--功能-->
        <fieldset class="layui-elem-field layui-field-title site-title">
            <legend><a name="grid">可用操作</a></legend>
        </fieldset>
        <div>
            <!--todo 如果是空角色，才显示下面这个按钮，当然只有店员才会去-->
            <a href="shopApply" target="_self" class="layui-btn layui-btn-md layui-btn-checked" th:if="${session.role == null}">申请进入店铺</a>

            <!--todo 如果是店长，才显示下面的-->
            <a href="shopClerk" target="_self" class="layui-btn layui-btn-md layui-btn-danger" th:if="${session.isManager}">店员管理</a>
            <a href="shopProduct" target="_self" class="layui-btn layui-btn-md layui-btn-warm" th:if="${session.isManager}">商品管理</a>
        </div>
    </div>
</body>
</html>